{ ***  cef_request_capi.h  *** }

    PCefRequest = ^TCefRequest;
    PCefPostData = ^TCefPostData;
    PCefPostDataElementArray = ^TCefPostDataElementArray;
    PCefPostDataElement = ^TCefPostDataElement;

    // Structure used to represent a web request. The functions of this structure
    // may be called on any thread.
    TCefRequest = record
        // Base structure.
        base: TCefBase;

        // Returns true (1) if this object is read-only.
        is_read_only: function(self: PCefRequest): Integer; cconv;

        // Get the fully qualified URL.
        //
        // The resulting string must be freed by calling cef_string_userfree_free().
        get_url: function(self: PCefRequest): PCefStringUserFree; cconv;

        // Set the fully qualified URL.
        set_url: procedure(self: PCefRequest; const url: PCefString); cconv;

        // Get the request function type. The value will default to POST if post data
        // is provided and GET otherwise.
        //
        // The resulting string must be freed by calling cef_string_userfree_free().
        get_method: function(self: PCefRequest): PCefStringUserFree; cconv;

        // Set the request function type.
        set_method: procedure(self: PCefRequest; const method: PCefString); cconv;

        // Get the post data.
        get_post_data: function(self: PCefRequest): PCefPostData; cconv;

        // Set the post data.
        set_post_data: procedure(self: PCefRequest; postData: PCefPostData); cconv;

        // Get the header values.
        get_header_map: procedure(self: PCefRequest; headerMap: TCefStringMultimap); cconv;

        // Set the header values.
        set_header_map: procedure(self: PCefRequest; headerMap: TCefStringMultimap); cconv;

        // Set all values at one time.
        set_: procedure(self: PCefRequest; const url, method: PCefString;
          postData: PCefPostData; headerMap: TCefStringMultimap); cconv;

        // Get the flags used in combination with cef_urlrequest_t. See
        // cef_urlrequest_flags_t for supported values.
        //get_flags: function(self: PCefRequest): Integer; cconv;
        get_flags: function(self: PCefRequest): TCefUrlRequestFlags; cconv;

        // Set the flags used in combination with cef_urlrequest_t.  See
        // cef_urlrequest_flags_t for supported values.
        set_flags: procedure(self: PCefRequest; flags: Integer); cconv;

        // Set the URL to the first party for cookies used in combination with
        // cef_urlrequest_t.
        //
        // The resulting string must be freed by calling cef_string_userfree_free().
        get_first_party_for_cookies: function(self: PCefRequest): PCefStringUserFree; cconv;

        // Get the URL to the first party for cookies used in combination with
        // cef_urlrequest_t.
        set_first_party_for_cookies: procedure(self: PCefRequest; const url: PCefString); cconv;

        {ND CEF3 upgrade}

        // Get the resource type for this request. Accurate resource type information
        // may only be available in the browser process.
        //cef_resource_type_t (CEF_CALLBACK *get_resource_type)(
        //    struct _cef_request_t* self);
        get_resource_type: function(self: PCefRequest): TCEFResourceType; cconv;

        // Get the transition type for this request. Only available in the browser
        // process and only applies to requests that represent a main frame or sub-
        // frame navigation.
        //cef_transition_type_t (CEF_CALLBACK *get_transition_type)(
        //    struct _cef_request_t* self);
        get_transition_type: function(self: PCefRequest): TCEFTransitionType; cconv;
    end;


  // Structure used to represent post data for a web request. The functions of
  // this structure may be called on any thread.
  TCefPostData = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is read-only.
    is_read_only: function(self: PCefPostData):Integer; cconv;

    // Returns the number of existing post data elements.
    get_element_count: function(self: PCefPostData): csize_t; cconv;

    // Retrieve the post data elements.
    get_elements: procedure(self: PCefPostData; elementsCount: Pcsize_t;
      elements: PCefPostDataElementArray); cconv;

    // Remove the specified post data element.  Returns true (1) if the removal
    // succeeds.
    remove_element: function(self: PCefPostData;
      element: PCefPostDataElement): Integer; cconv;

    // Add the specified post data element.  Returns true (1) if the add succeeds.
    add_element: function(self: PCefPostData;
        element: PCefPostDataElement): Integer; cconv;

    // Remove all existing post data elements.
    remove_elements: procedure(self: PCefPostData); cconv;
  end;

  TCefPostDataElementArray = array[0..(High(Integer) div SizeOf(PCefPostDataElement)) - 1] of PCefPostDataElement;

  // Structure used to represent a single element in the request post data. The
  // functions of this structure may be called on any thread.
  TCefPostDataElement = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is read-only.
    is_read_only: function(self: PCefPostDataElement): Integer; cconv;

    // Remove all contents from the post data element.
    set_to_empty: procedure(self: PCefPostDataElement); cconv;

    // The post data element will represent a file.
    set_to_file: procedure(self: PCefPostDataElement;
        const fileName: PCefString); cconv;

    // The post data element will represent bytes.  The bytes passed in will be
    // copied.
    set_to_bytes: procedure(self: PCefPostDataElement;
        size: csize_t; const bytes: Pointer); cconv;

    // Return the type of this post data element.
    get_type: function(self: PCefPostDataElement): TCefPostDataElementType; cconv;

    // Return the file name.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_file: function(self: PCefPostDataElement): PCefStringUserFree; cconv;

    // Return the number of bytes.
    get_bytes_count: function(self: PCefPostDataElement): csize_t; cconv;

    // Read up to |size| bytes into |bytes| and return the number of bytes
    // actually read.
    get_bytes: function(self: PCefPostDataElement;
        size: csize_t; bytes: Pointer): csize_t; cconv;
  end;

    // Create a new TCefRequest object.
    tfn_cef_request_create = function: PCefRequest; cdecl;

    // Create a new TCefPostData object.
    tfn_cef_post_data_create = function: PCefPostData; cdecl;

    // Create a new TCefPostDataElement object.
    tfn_cef_post_data_element_create = function: PCefPostDataElement; cdecl;

